package k2_oop.p2_inheritAndPolymorphic.demo09;

/**
 * 3.编写测试类来操作Hero
 */
public class TestDemo9 {
    public static void main(String[] args) {

        Pet pet = new Dog();
        pet.setName("旺财");
        Hero hero = new Hero("tom",pet);

        hero.run();
    }
}
